<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSystemMenu extends Migration
{
    /**
     * Run the migrations. 系统菜单表
     *
     * @return void
     */
    public function up()
    {
        Schema::create('system_menu', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('pid');                                 // 父id
            $table->string('title');                                // 名称
            $table->string('icon');                                 // 菜单图标
            $table->string('href')->nullable();                                 // 连接
            $table->string('target')->default('_self');      // 链接打开方式
            $table->integer('sort');                             // 菜单排序
            $table->tinyInteger('status')->default(1);       // 状态（0：禁用，1：启用）
            $table->string('remark')->nullable();                               // 备注信息
            $table->softDeletes();                                          //  软删除
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('system_menu');
    }
}
